<template>
    <view  v-if="countdown <= 60 && countdown > 0" style="margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; flex-direction: column; height: 100vh; overflow: hidden;">
        <image class="images-huiyuan" src="https://preview.qiantucdn.com/auto_machine/20240112/fa3d5795-d357-4823-aaf9-c37ba98d2e45.jpg!qt_w320_webp"></image>
        <view class="tiaoguo" @click="goindex">
            跳过
        </view>
    </view>
</template>

<script setup>
    import { ref } from 'vue';
    import { onShow, onLoad } from '@dcloudio/uni-app';
    import { url } from '@/utils/request.js';
    const huiyuanxiangqing = ref('');
	const goindex=()=>{
		uni.switchTab({
			url:'../index/index'
		})
	}
	const countdown= ref(0)
	onLoad(()=>{
		 uni.hideTabBar();
		 let interval = setInterval(() => {
		 	countdown.value--;
		 	if (countdown.value === 0) {
		 		clearInterval(interval);
				uni.showTabBar(); // 显示 tabbar
		 	}
			
		 }, 1000);
		 
	})
</script>

<style>
    .images-huiyuan {
        width: 100vw;
        height: 100vh;
        object-fit: cover; /* Ensures the image maintains its aspect ratio */
    }
    .tiaoguo {
        position: absolute;
        top: 120px;
        right: 20px;
        padding: 4px;
        width: 58px;
        text-align: center;
        border-radius: 25px;
        opacity: 0.7;
        color: white;
        background-color: black;
    }
</style>
